<template>
	<view>
		<!-- 条件注释 -->
		<!-- #ifdef H5 -->
		<view>只在H5中显示</view>
		<!-- #endif -->
		<!-- #ifdef MP-WEIXIN -->
		<view>只在微信小程序中显示</view>
		<!-- #endif -->
		<view>
		<swiper indicator-dots="true" autoplay="true" interval="2000">
			<swiper-item>
				<image src="../../static/imgs/1.jpg"></image>
			</swiper-item>
			<swiper-item>
				<image src="../../static/imgs/小黄人.jpg"></image>
			</swiper-item>
			<swiper-item>
				<image src="../../static/imgs/dog.jpg"></image>
			</swiper-item>
			<swiper-item>
				<image src="../../static/imgs/cat.jpg"></image>
			</swiper-item>
		</swiper>
		</view>
	</view>
</template>

<script>
	export default{
		// 同理也可以条件注释
		onLoad(){
			// #ifdef H5
			console.log("H5中打印")
			// #endif
			// #ifdef MP-WEIXIN
			console.log("微信小程序中打印")
			// #endif
		}
	}
	
	
</script>

<style>
	/* #ifdef H5 */
	view{
		color: red;
	}
	image{
		width: 360px; 
		height: 150px;
	}
	/* #endif */
	/* #ifdef MP-WEIXIN */
	view{
		color: #007AFF;
	}
	image{
		width: 320px; 
		height: 150px;
	}
	/* #endif */
	
</style>
